//
//  ZSIndexHeaderView.m
//  ROSE
//
//  Created by Apple on 2018/5/31.
//  Copyright © 2018年 HeNanZhongDunYunAn. All rights reserved.
//

#import "ZSIndexHeaderView.h"

@implementation ZSIndexHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self = [[[NSBundle  mainBundle] loadNibNamed:@"ZSIndexHeaderView" owner:self options:nil] firstObject];
        self.firstLbel.textColor = [UIColor colorWithHexString:@"#b60f4f"];
        self.secondLabel.textColor = [UIColor themeColor];
        self.secHeaderLabel.textColor=
        self.lineLabel1.backgroundColor=
        self.lineLabel2.backgroundColor=[UIColor themeColor];
        self.backgroundColor = [UIColor clearColor];
    }
    return self;
}

- (void)setDataWithUserModel:(ZSUserModel *)model withNumber:(NSUInteger)num;{

        self.firstLbel.text = model.YHM;
        self.secondLabel.text = [NSString stringWithFormat:@"%@ ROST", model.YUE];
        
        NSMutableAttributedString * firstPart = [[NSMutableAttributedString alloc] initWithString:@"共有"];
        
        NSMutableAttributedString * secondPart = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%lu", num]];
        NSDictionary * secondAttributes = @{NSForegroundColorAttributeName:[UIColor themeColor],};
        [secondPart setAttributes:secondAttributes range:NSMakeRange(0,secondPart.length)];
        [firstPart appendAttributedString:secondPart];
        [firstPart appendAttributedString:[[NSAttributedString alloc] initWithString:@"支玫瑰"] ] ;
        self.secHeaderAnnounceLabel.attributedText = firstPart;
    
}
@end
